package com.mobile.struts.common;

import java.util.Enumeration;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.mobile.struts.action.BaseDispatchAction;

public class LoginAction extends BaseDispatchAction{
	public ActionForward login(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		
		Map<String,String[]> map = request.getParameterMap();
		for(Map.Entry<String, String[]> entry:map.entrySet()){
			System.out.println(entry.getKey()+">>"+entry.getValue()[0]);
		}
		Enumeration<String> enu = request.getAttributeNames();
		while(enu.hasMoreElements()){
			String name = enu.nextElement();
			System.out.println(name+">>"+request.getAttribute(name));
		}
		
		Enumeration<String> enu1 = request.getHeaderNames();
		while(enu1.hasMoreElements()){
			String name = enu1.nextElement();
			System.out.println(name+">>"+request.getHeader(name));
		}
		System.out.println("RemoteUser："+request.getRemoteUser());
		//String 
		return null;
	}
}
